home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software 2000
/
Software 2000 Volume 1 (Disc 1 of 2).iso
/
utilities
/
u254.dms
/
u254.adf
/
M.DOC
< prev
next >
Wrap
Text File
|
1990-05-11
|
10KB
|
238 lines
MANDELSHOW Fractal Graphics Generator V1.1
==========================================
Okay, so you've seen the Mandelbrot Set being generated before... but by a
bunch of Transputers ( a dozen 20MHz T800's maybe ) in no time flat. Well
here's the same equation being chewed over by a single 7.16MHz MC68000.
It only takes an hour to render a big, detailed picture - compare this to
a program written in C on an IBM compatible, four hours or more with less
resolution than your Amiga.
Fractals are infinitely detailed, wierdly beautiful and addictive. I spent
more time running this program than developing it !
The program is fairly self-explanatory and I recommend that you play with it
a bit before reading the rest of this documentation. Just one thing though,
the START-POSITION.PIC is not absolutely necessary but does speed things up
at the start. You can use any fractal image as the Start Position, the one on
disk is the initial picture as generated by the default settings.
Fractal pictures are saved off as IFF pictures, compatible with DPAINT II,
DPAINT III, Pixmate and just about any other graphics utility, so you can
use the pictures in any way you like - that is how I generated the main
program .INFO icon image.
The Menus
=========
PROJECT
=======
Redraw Picture Draws the picture from scratch. You can break out to the
menus by hitting the ESC key.
The first few lines of a full size picture are drawn behind
the title bar, don't worry ! See View Pic.
Continue Pic Okay, you've drawn half a picture and pressed ESC. As long
as you haven't changed anything ( except colours ) this
command will recommence drawing. ESC aborts.
Load Position You can load in a previously found position and continue
exploring... Position files are very short, so you can save
off your current location with no worries. All Load and
Save options use the same File Selector, fairly standard.
Save Position Type in a file name and away you go !
Load Picture Loads in an IFF picture that was saved by MandelShow. It
contains position data ( as in a Position file ) so that
you can quickly carry on from where you left off. Pics
take much more room than Position files but are the only
way to export your work.
Save Picture Saves a compressed IFF picture with additional position
information ( in a FRAC chunk ) and an icon similar to
those provided by DPaintII. The icon is designed to be
of use to your art package. MandelShow ignores them.
If your picture has a different centre to your current
position then you will be warned to Redraw. Click on Okay
to abort or Cancel to save the picture anyway, with the
wrong position information in it.
About The sign-on message window. Read it, click on the
close-gadget to exit, then use the right button to
view the menu bar.
Quit The exit. It double checks;- Okay to quit, Cancel to stay.
VIEW
====
New Centre This allows you to click on a point of interest and then
zoom in on it. You will see that the pointer changes to a
cross-hair cursor. If you decide not to change the centre
point, just press ESC to abort. If you do change the centre
then this menu item is disabled until you Redraw, because
the picture no longer agrees with the position.
Big Picture Sets the picture to its maximum size, the entire screen.
This is best when you're fairly sure that the position is
worth seeing in detail. Changing picture size temporarily
disables New Centre until you Redraw and have a valid pic.
Small Picture Sets the picture to its minimum size, one ninth of the
screen. This is great for having a quick look at new
positions, nine times faster than the Big Picture view.
Detailed Pic This is the slow, deep setting that brings out lots of
minor detail. You will probably want to use this mode with
the Big Picture view only for screens to save onto disk.
Use with Small Picture view to see extra detail.
Fast Picture This produces a fast, approximate Mandelbrot picture that
is great for exploring with. It works best at low levels
of magnification.
View Picture Select this to view a full screen in its correct palette -
click the left button or press ESC to exit. Note that the
palette is modified during menu operations so that the
text is always visible.
Reset Params Brings you back to minimum magnification, the standard
initial values for position and the standard palette.
MAGNIFY
=======
By 2 \
By 4 >- Zooms you in - starts redrawing immediately.
By 8 /
By 1/2 \
By 1/4 >- Zooms you back out and starts redrawing immediately.
By 1/8 /
Maximum Zooms in as far as possible ... note that the FFP library
starts to lose accuracy at the highest levels of
magnification, so funny effects can arise - be warned !
Minimum Zooms all the way out. Not terribly useful unless you are
completely lost.
COLOURS There are six palettes to choose from, each giving a
======= different "feel" to a picture. You can change the colours
of any IFF picture files that you save off using your
favourite art package, but you won't be able to load them
back in.
Notes
=====
I use HiSoft's DEVPAC ( GenAm, MonAm ) on a 512k Belgian A1000 with either
KickStart 1.2 or 1.3 in "ROM" space depending on the phases of the moon...
Actually it's based on how well my desk is organised and which one I find
first in the morning. So it should be compatible with both. DON'T try to run
the code on a Kick1.0 or Kick1.1 machine, NO GO. ( Who are these people
anyway ? )
I'm not Belgian by the way, this is a "Grey Import" machine. This code is
completely Belgian free, no Belgian influences at all. Except that they
always seem to get a few free mentions.
The code is 100% assembly, no compilers ( yuk ) or other stuff. It's fast,
mean and lean but probably has bugs. If you find any, DON'T TELL ME.
The program looks for the initialisation picture/position under the names:-
DF0:Start-Position.Pic
DF0:MandelShow/Start-Position.Pic
<current-directory>:Start-Position.Pic
<current-directory>:MandelShow/Start-Position.Pic
By default it's likely to be in DF0:, so should cause no problems.
If you change the contents of this file, ie save off a different picture,
then that new position will become the default starting place on the Mandel-
brot picture. Very handy for deep delvers.
The total available space for exploration is about a million screens full,
which should keep you occupied for a while.
If you want to run the generator as a background task, then set it running
and click on the depth gadgetry, as normal. The program will "flash" all the
screens in the system when the picture is finished, using LVO_DisplayBeep.
It is a processor intensive task, so it is best run behind something that
requires a lot of system-waiting-for-input, eg a text editor.
I use a modified version of this algorithm to calculate the colour value for
each pixel :-
for y=0 to screenheight-1
q:=y_start+y*stepsize ;stepsize depends on magnification level
for x=0 to screenwidth-1
counter=0
xvar:=0
yvar:=0
p:=x_start+x*stepsize ;x_start & y_start depend on centre point
loop: ;just a label
xtemp:=(xvar^2)-(yvar^2)+p
yvar:=2*xvar*yvar+q
xvar:=xtemp
counter:=counter+1 ;(ie counter++)
if (xvar^2)+(yvar^2) < trigger ;exits if we're sure it's interesting
then
if counter < maximum_iterations ;exits if it's getting boring
then
loop ;this is a GOTO
else
setcolour(count&15) ;don't have to use this colouring rule
writepixel(x,y) ;hit the screen
next x,y
end
DISCLAIMER
==========
PROGRAM DISCLAIMER: The program is provided "AS IS" without warranty of any
kind, either expressed or implied, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose. The
entire risk as to the results and performance of the program is assumed by
the user.
Or, in English, if Commodore-Amiga change the rules (again), or this little
gem of a proglet gets stroppy with your 8-inch floppy, hard luck.
I have tested this program as well as I am able and believe it to be stable,
but somewhere, someone will crash it. C'est la vie.
CONDITIONS
==========
Feel free to distribute this code on a non-profit basis; the graphics that
you create with it are yours to do with as you will, and none of my business.
It is important that you should spread this DOC file with the object code,
but the pictures & positions are less important.
Nic/89
> Gaudete! <